// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdChangeLog
 */
public class AdChangeLogDaoImpl
    extends org.tinaelle.server.domain.AdChangeLogDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdChangeLogDao#toAdChangeLogDTO(org.tinaelle.server.domain.AdChangeLog)
     */
    public org.tinaelle.common.dto.AdChangeLogDTO toAdChangeLogDTO(final org.tinaelle.server.domain.AdChangeLog entity)
    {
        return super.toAdChangeLogDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdChangeLog loadAdChangeLogFromAdChangeLogDTO(org.tinaelle.common.dto.AdChangeLogDTO adChangeLogDTO)
    {
        org.tinaelle.server.domain.AdChangeLog adChangeLog = this.load(adChangeLogDTO.getAdChangeLogId());
        if (adChangeLog == null)
        {
            adChangeLog = org.tinaelle.server.domain.AdChangeLog.Factory.newInstance();
        }
        return adChangeLog;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdChangeLogDao#adChangeLogDTOToEntity(org.tinaelle.common.dto.AdChangeLogDTO)
     */
    public org.tinaelle.server.domain.AdChangeLog adChangeLogDTOToEntity(org.tinaelle.common.dto.AdChangeLogDTO adChangeLogDTO)
    {
        org.tinaelle.server.domain.AdChangeLog entity = this.loadAdChangeLogFromAdChangeLogDTO(adChangeLogDTO);
        this.adChangeLogDTOToEntity(adChangeLogDTO, entity, true);
        return entity;
    }
}